System for calibrating an electrical control system

ABSTRACT

A method calibrates a current sensing instant to latch a current value from a set of current signals. A current command including a magnitude at a Gamma angle is provided to control a motor when the motor is operating in a motoring mode at a shaft speed. A matching current command including a same magnitude at a same Gamma angle is provided to control the motor when the motor is operating in a braking mode at a same shaft speed. A first actual averaging rms current magnitude of three phase currents of the motor is monitored when the motor is controlled by the current command and operating in the motoring mode. A second actual averaging rms current magnitude of the three phase currents of the motor is monitored when the motor is controlled by the matching current command and operating in the braking mode. A current sensing instant is adjusted until an observed first actual averaging rms current magnitude in the motoring mode equals an observed second actual averaging rms current magnitude in the braking mode.

TECHNICAL FIELD

The present description relates generally to a system and method,generally referred to as a system, for calibrating an electrical controlsystem.

BACKGROUND

Motors, such as alternating current machine like an interior permanentmagnet (IPM) motor, a synchronous IPM machine (IPMSM), conventionalinduction machines, surface mounted PM machines (SMPM), otheralternating current machines, or various other machines, may becontrolled and/or powered in various ways. For example, motors may bepowered using a battery, electricity, fossil fuels, motors, supplyvoltages, or other sources. Motors may be controlled manually and/orwith the assistance of computer processors.

SUMMARY

A method calibrates a current sensing instant to latch a current valuefrom a set of current signals. A current command including a magnitudeat a Gamma angle is provided to control a motor when the motor isoperating in a motoring mode at a shaft speed. A matching currentcommand including a same magnitude at a same Gamma angle is provided tocontrol the motor when the motor is operating in a braking mode at asame shaft speed. A first actual averaging rms current magnitude ofthree phase currents of the motor is monitored when the motor iscontrolled by the current command and operating in the motoring mode. Asecond actual averaging rms current magnitude of the three phasecurrents of the motor is monitored when the motor is controlled by thematching current command and operating in the braking mode. A currentsensing instant is adjusted until an observed first actual averaging rmscurrent magnitude in the motoring mode equals an observed second actualaveraging rms current magnitude in the braking mode.

Other systems, methods, features and advantages will be, or will become,apparent to one with skill in the art upon examination of the followingfigures and detailed description. It is intended that all suchadditional systems, methods, features and advantages be included withinthis description, be within the scope of the embodiments, and beprotected by the following claims and be defined by the followingclaims. Further aspects and advantages are discussed below inconjunction with the description.

BRIEF DESCRIPTION OF THE DRAWINGS

The system and/or method may be better understood with reference to thefollowing drawings and description. Non-limiting and non-exhaustivedescriptions are described with reference to the following drawings. Thecomponents in the figures are not necessarily to scale, emphasis insteadbeing placed upon illustrating principles. In the figures, likereferenced numerals may refer to like parts throughout the differentfigures unless otherwise specified.

FIG. 1 is a block diagram a control system for controlling a motor.

FIG. 2 is a block diagram of an electronic data processing system usefulwith a control system for controlling a motor.

FIG. 3 is a signal diagram in a motoring mode and a braking mode for amotor.

FIG. 4 is a flow chart of a method of calibrating a current sensinginstant.

FIG. 5 is a flow chart of a method of calibrating a current sensinginstant.

FIG. 6 is a flow chart of a method of generating a lookup table withscaling coefficients.

FIG. 7 is a circuit diagram of a portion of a control system forcontrolling a motor.

FIG. 8 is a block diagram of a portion of a control system forcontrolling a motor.

DETAILED DESCRIPTION

In many motorized systems, precise control of the operation of motorsmay be desired, and in some situations, required. Precision control andoperation of motors may require an understanding of the properties ofthe motor, as well as significant processing capabilities

FIG. 1 illustrates a control system which may be used for controllingone or more motors, such as a motor 117. The control system may includeone or more of an electronic data processing system 120, an inverterswitching circuit 188, a sensor 115, and/or a vehicle data bus 118. Moreor less components or features may be included. The control system mayrefer to a combination of the electronic data processing system 120, theinverter switching circuit 188, and the sensor 115. In some systems, thecontrol system may include the vehicle data bus 118. In other systems,the control system may only refer to the electronic data processingsystem 120 and/or the inverter switching circuit 188. The motor 117and/or mechanical shaft 126 shown in FIG. 1 may or may not be considereda part of the control system. In some embodiments, the control system ofFIG. 1, aside from the motor 117, may be referred to as an inverter or amotor controller.

The control system may be implemented and/or used to control one or moremotors, such as, for example, a motor 117. The motor 117 may refer tovarious machines or motors, such as an alternating current machine likean interior permanent magnet (IPM) motor, a synchronous IPM machine(IPMSM), conventional induction machines, surface mounted PM machines(SMPM), other alternating current machines, or various other machines.In some embodiments, an IPMSM may have favorable advantages comparedwith conventional induction machines or surface mounted PM machines(SMPM) such as high efficiency, high power density, wide constant poweroperating region, and less maintenance, for instance. For simplicity,the controlled machine may be referred to as motor 117, but it should beappreciated that the disclosure is not limited to a motor.

Motor 117 may function and/or operate in various ways. For example, themotor 117 may be powered and/or controlled by a power supply. The powersupply may, for example, be a voltage source (or source voltage) or avoltage supply (or supply voltage), such as a battery, electricity, busvoltage (such as direct current bus voltage), and/or other power,voltage, or current supplies.

The motor 117 may require, receive, be powered by, and/or operate basedon a control signal. The control signal may, for example, be a currentand/or voltage command, such as a three-phase current and/or voltagecommand. The control signal may physically power the motor 117, and/ormay instruct the machine how to operate. The control signal may containand/or deliver power from the power supply to the motor.

The control signal may, for example, be sent to the motor 117 by theinverter switching circuit 188, a generation module 112 such as a pulsewidth modulation generator, or other features or components. Other waysof operating and/or powering the motor 117 may be possible.

Motor 117 may be operable and/or function in various modes. For example,the motor 117 may be operable and/or function in a motoring mode. Amotoring mode may refer to a mode where the motor 117 drives an attachedmechanical shaft, such as mechanical shaft 126, or other device in adirection, with a speed, at an acceleration, and/or with a power. Forexample, a motoring mode may refer to a mode where the motor 117,attached to a larger machine such as a vehicle, drives, powers, propels,and/or accelerates the larger machine in a first direction. The motoringmode may refer to a mode where the motor 117 is consuming and/orreceiving power from a power supply.

The motoring mode may be initiated by a command, such as a command froma user. For example, a user may instruct the control system and/ormotor, though a user interface, to power the motor. An example of a userinterface may be the controller 266 shown in FIG. 2 and discussed below.The control system may process the instruction and produce a signaland/or command to drive the motor.

Motor 117 may also operate in a braking mode, or a generating mode. Abraking mode, or generating mode, may refer to a mode where the motor117 is not driving and/or powering a machine. For example, a brakingmode may exist or refer to where a motor 117 is running and no powersignal and/or command is being sent to the motor 117. In the braking orgenerating mode, the motor 117 may be generating a charge and/orsupplying electrical power and/or voltage to the power supply. Forexample, a rotating motor which may be idling may generate a signaland/or charge from its rotation which may be transmitted to the powersource for the motor and/or control system, such as a de bus voltagesource. The braking mode may refer to a mode of operation where themotor is supplying power to the power source. In some systems, brakingmode may refer to an operation of the motor 117 where the motor 117and/or mechanical shaft 126 is rotated in an opposite direction than inthe motoring mode.

In some embodiments, a distinction between a motoring mode and a brakingmode is that a motoring mode refers to a period where a motor 117 isconsuming power from the power supply, and the braking mode (orgeneration mode) may refer to where the motor 117 is feeding power backinto the power supply. Other modes of operating the motor 117 arepossible.

As mentioned and shown in FIG. 1, the motor 117 may be connected to,coupled with, and/or in communication with the inverter switchingcircuit 188.

The inverter switching circuit 188 may receive command signals from theelectronic data processing system 120, such as from the generationmodule 112. For example, the generation module 112 may provide inputs toa driver stage within the inverter circuit 188. Such command signals maybe generated, and/or transmitted by the generation module 112 to theinverter switching circuit 188 to be processed and sent to the motor 117for controlling and/or driving the motor 117. In some systems, suchcommands may be referred to as voltage commands, or three phase voltagecommands.

The inverter switching circuit 188 may be powered by a power supply. Insome configurations, the inverter switching circuit 188 and/or the powersupply to the inverter switching circuit 188 may be considered the powersupply for the motor 117. In some configurations, the power supply maybe a direct current (DC) voltage bus. The power supply may alternativelybe a voltage source (or source voltage) or a voltage supply (or supplyvoltage), such as a battery, electricity, another bus voltage, and/orother power, voltage, or current supplies. Other power supplies andconfiguration are possible.

The inverter switching circuit 188 may include power electronics, suchas switching semiconductors, which may function and/or be used togenerate, modify and/or control pulse-width modulated signals or otheralternating current signals, such as pulse, square wave, sinusoidal, orother waveforms. The inverter switching circuit 188 may include asemiconductor drive circuit that drives or controls switchingsemiconductors (e.g., insulated gate bipolar transistors (IGBT) or otherpower transistors) to output the generated and/or modified controlsignals to the motor 117.

As mentioned, the inverter switching circuit 188 may receive a voltagecommand, or other command signal, from a generation module 112. Theinverter switching circuit 188 may provide voltage, current, and/orpower signals or commands based on the received command signals to themotor 117. For example, the inverter switching circuit 188 may receivecommands and/or command signals from the generation module 112, maytransform supply voltage supplied to and/or fed to the inverterswitching circuit 188 into a voltage command and/or voltage signal,and/or may transmit or otherwise send the voltage command and/or voltagesignal to the motor 117. The command and/or signal generated by theinverter switching circuit 188 may be, and/or may also be referred toas, a voltage command, a terminal voltage command, or a dq-axis voltagecommand.

Control signals or commands provided by the inverter switching circuit188 to the motor 117 may control and/or drive the motor 117. Forexample, an output stage, port, or transmission of the inverterswitching circuit 188 may provide and/or transmit a pulse-widthmodulated voltage waveform or other voltage signal for control of themotor. Control signals and/or commands provided by the inverterswitching circuit 188 to the motor 117 may or may not be based on and/orrelated to the command signals received by the inverter switchingcircuit 188 from the generation module 112.

The motor 117 may be attached to, connected with, and/or incommunication with a mechanical shaft 126. The mechanical shaft 126 maybe configured and/or attached to the motor 117 such that when the motor117 is running, the mechanical shaft 126 may rotate or otherwise bedisplaced. As an example, a motor 117 may drive a rotation of themechanical shaft 126. In this way, an object attached to an end of themechanical shaft, such as a wheel, may be rotated by the motor 117. Themechanical shaft 126 may be a motor shaft, or various other shafts.

The mechanical shaft 126 may be various shapes, sizes, and/ordimensions, and may be made of various materials. For example, amechanical shaft 126 may be any mechanical shaft configured and/orcapable of being used with a motor 117, such as a shaft in a vehicleattached to a vehicle motor. Other mechanical shafts may be possible.

The motor 117 may also be associated with a sensor 115. The sensor 115may be, and/or may include a position sensor, a brushless resolver,another resolver, an encoder position sensor, a speed sensor, a shaft orrotor speed detector, a digital position encoder, a direct currentmotor, an optical encoder, a magnetic field sensor such as a Hall Effectsensor, a magneto-resistive sensor, or various combination of sensors,encoders, or encoders. An output of the sensor may include analogsignals, digital signals, or both. Other sensors may be possible.

Sensor 115 may be connected, attached to, and/or in communication withthe mechanical shaft 126 and/or the motor 117. For example, the sensor115 may be mounted on or integral with the mechanical shaft 126. Thismay be useful in systems where a rotation or displacement of themechanical shaft can be easily and/or directly correlated with one ormore properties of the motor 117. Alternatively, the sensor 115 may beconnected directly to the motor and/or other components attached to orin communication with the motor. In addition, more than one sensor 115may be used in some systems. For example, one sensor 115 may be used tosense data for each phase of a three phase motor. Various configurationsare possible.

The sensor 115 may be used to monitor, measure, and/or estimate one ormore properties of the motor 117 and/or the mechanical shaft 126. Wherethe sensor 115 is connected or attached to the mechanical shaft, thesensor 115 may, for example, monitor, measure, and/or estimateproperties of the mechanical shaft 126, such as an angular position ofthe mechanical shaft 126, a speed or velocity of the mechanical shaft126, and/or a direction of rotation of the mechanical shaft 126.Alternatively, the sensor 115 may measure one or more properties of amotor 117 directly, such as, for example, an angular position of themotor 117, a speed or velocity of the motor 117, and/or a direction ofrotation of the motor 117.

In some configurations, the sensor 115 includes a position sensor, whereposition data and associated time data are processed to determine speedor velocity data for the mechanical shaft 126. In other configurations,the sensor 115 may include a speed sensor, or the combination of a speedsensor and an integrator to determine the position of the motor shaft.In other configurations, the sensor 115 may include an auxiliary,compact direct current generator that is coupled mechanically to themechanical shaft 126 of the motor 117 to determine speed of the motorshaft 126. In these configurations, the direct current generator mayproduce an output voltage proportional to the rotational speed of themotor shaft 126. In other configurations, the sensor 115 may include anoptical encoder with an optical source that transmits a signal toward arotating object coupled to the mechanical shaft 126 and receives areflected or diffracted signal at an optical detector. In theseconfigurations, the frequency of received signal pulses (e.g., squarewaves) may be proportional to a speed of the mechanical shaft 126. Inother configurations, the sensor 115 may include a resolver with a firstwinding and a second winding, where the first winding is fed with analternating (AC) current, where the voltage induced in the secondwinding varies with the frequency of rotation of the rotor. Variousother configurations are possible.

The sensor 115 may output a signal based on properties and/or signalsmonitored, measured, and/or estimated from the attachment or connectionto the mechanical shaft 126 and/or the motor 117. The output of thesensor 115 may include feedback data such as current feedback data likei_(a), i_(b), i_(c), raw signals, such as raw position or velocitysignals, or other feedback or raw data. Other possible feedback dataincludes, but is not limited to, winding temperature readings,semiconductor temperature readings of the inverter circuit 188, threephase voltage or current data, or other thermal or performanceinformation for the motor 117. Alternatively or in addition, the outputof the sensor 115 may include processed signals. The output of thesensor 115 may be an analog or digital signal.

In some embodiments, the sensor 115 may be coupled to ananalog-to-digital converter (not shown) that may convert analog positiondata or velocity data to digital position or velocity data respectively.Such an analog-to-digital converter may be internal or external to thecontrol system and/or electronic data processing system 120. In otherembodiments, the sensor 115 may provide a digital data output ofposition data or velocity data, such as position data or velocity datafor the mechanical shaft 126 or the rotor.

The output of a sensor 115 may be transmitted, sent, passed, and/orotherwise communicated to the electronic data processing system 120. Insome systems, the output may be coupled to the primary processing module114 of the electronic data processing system 120. In embodiments wherethe sensor 115 is coupled to an analog-to-digital converter (not shown),the output of the analog-to-digital converter may be transmitted, sent,passed, and/or otherwise communicated to the primary processing module114.

The control system may include an electronic data processing system 120.The electronic data processing system 120 is indicated by the dashedlines in FIG. 1 and is shown in greater detail in FIG. 2.

The electronic data processing system 120 may be used to supportstoring, processing or execution of software instructions of one or moresoftware modules. The electronic data processing system 120 may includeelectronic modules, software modules, hardware modules, or combinationsof each.

The electronic data processing system 120 may include one or moreelements, features, and/or components, such as a sensing circuit 124, ananalog-to-digital converter 122, a primary processing module 114, asecondary processing module 116, a phase converter 113, a calculationmodule 110, a dq-axis current generation manager 109, a summer orsummation module 119, a current shaping module 106, a rotor magnettemperature estimation module 104, a terminal voltage feedback module108, a current adjustment module 107, a torque command generation module105, a current regulation controller 111, and/or a generation module112. The electronic data processing system may also or alternativelyinclude a digital processing system and/or a field-programmable gatearray. One or more of the components of the electronic data processingsystem 120 may be combined into each other, and/or may be divided amongother components. For example, in some systems, the sensing circuit 124and the analog-to-digital converter 122 may be external to theelectronic data processing system 120. More or less components may beincluded with the electronic data processing system 120. In someembodiments, the electronic data processing system 120 of FIG. 1 mayrepresent more than one electronic data processing system, some or allof which may be connected, attached, and/or in communication with eachother.

As mentioned, an output of the sensor 115 may be sent, transmitted,and/or otherwise communicated to the electronic data processing system120. For example, an output of the sensor 115 may be sent to the primaryprocessing module 114.

The primary processing module 114, which may be a position and/or speedprocessing module, may process the output from the sensor 115. Theprimary processing module 114 may process, determine, calculate,estimate, and/or otherwise identify position data (θ) and/or speed datafor the motor 117. In some systems, the sensor 115 on the motor 117 mayprovide position data (θ) for the motor shaft 126, and the primaryprocessing module 114 may convert the position data from the sensor 115into speed data.

The position data (θ) for the motor 117 may refer to a position of themechanical shaft 126 and/or a position of the motor 117. The positiondata (θ) may be expressed as and/or represent an angle, an offset angle,a phase, or various other angles or positions. The speed data may referto a speed of the motor 117. The speed data may be expressed as, and/orrefer to, revolutions per minute of the mechanical shaft 126, or may beexpressed and/or refer to various other speeds. The position data (θ)and/or speed data may be processed, determined, calculated, estimated,and/or otherwise identified by the primary processing module 114 basedon, or as a result of, the output received by the primary processingmodule 114 from the sensor 115.

The primary processing module 114 may output the position data (θ)and/or the speed data to one or more components of the control system.For example, the primary processing module 114 may output the positiondata (θ) to the phase converter 113, and/or may output the speed data tothe calculation module 110. Alternatively the primary processing module114 may output one or both of the position data (θ) and/or speed datafor the motor 117 to various other components of the control system.

In addition to the sensor 115 previously described, the control systemmay also include a sensing circuit 124. The sensing circuit 124 may haveinputs which may be coupled to the motor 117. The inputs of the sensingcircuit 124 may be used for and/or operable to monitor, measure, and/orestimate properties of the motor 117. For example, the inputs of thesensing circuit 124 may be coupled to terminals of the motor 117. Theinput of the sensing circuit 124 may be used to sense a measured currentof the motor 117. For example, the sensing circuit 124 may be associatedwith the motor 117 for measuring three phase currents, such as a currentapplied to the windings of the motor 117, back EMF induced into thewindings, or both. The sensing circuit 124 may also, or alternatively,be used to measure a voltage level of the motor 117, such as a directcurrent voltage level of the motor 117. Alternatively or in addition,the sensing circuit 124 may be used to measure a voltage supply levelused to power the motor 117 and/or used to power the inverter switchingcircuit 188, such as a high voltage DC data bus which provides DC powerto the inverter switching circuit 188. Other configurations arepossible. Additionally, other properties of the motor 117 may bemonitored, measured, and/or estimated.

The sensing circuit 124 is shown in FIG. 1 as being a part of theelectronic data processing system 120. Alternatively, the sensingcircuit 124 may be a component separate from the electronic dataprocessing system 120, and/or may be externally attached, connected,and/or in communication with the electronic data processing system 120.

The sensing circuit 124 may transmit and/or output signals sensed fromthe motor 117 to an analog-to-digital converter 122 in the electronicdata processing system 120. These signals may, for example, includemeasured three phase currents and/or a voltage level of a power supply,such as the direct current (DC) data bus voltage powering the inverterswitching circuit 188.

The analog-to-digital converter 122 is shown in FIG. 1 as being a partof the electronic data processing system 120. Alternatively, theanalog-to-digital converter 122 may be a component separate from theelectronic data processing system 120, and/or may be externallyattached, connected, and/or in communication with the electronic dataprocessing system 120.

The analog-to-digital converter 122 may receive an output of the sensingcircuit 124. The analog-to-digital converter 122 may transform and/ordigitize an analog output from the sensing circuit 124 into a digitalsignal which may then be further processed by the electronic dataprocessing system 120.

The analog-to-digital converter 122 may be attached, connected, coupledto, and/or in communication with the secondary processing module 116. Anoutput from the analog-to-digital converter 122, such as the digitizedoutput from the sensing circuit 124, may be transmitted to the secondaryprocessing module 116.

In some systems, the analog-to-digital converter 122 may not benecessary or included. For example, in systems where an output of thesensing circuit 124 is a digital signal, an analog-to-digital converter122 may not be useful.

The secondary processing module 116, which may in some systems bereferred to as a “direct current (DC) bus and three phase currentprocessing module,” may process, determine, calculate, estimate, orotherwise identify information from the signals received from theanalog-to-digital converter 122. For example, the secondary processingmodule 116 may determine or identify three phase currents (i_(a), i_(b),i_(c)) from the signal received from the sensing circuit 124. Thesethree phase currents (i_(a), i_(b), i_(c)) may represent and/or relateto the actual three phase currents generated by the motor 117.Alternatively or in addition, the secondary processing module 116 maydetermine or identify the direct current (DC) data bus voltage poweringthe inverter switching circuit 188.

The secondary processing module 116 may include one or more digitalsignal processors, field programmable gate arrays, other processors,and/or various other components. In addition or alternatively, thesecondary processing module 116 may be included in one or more digitalsignal processors, field programmable gate arrays, other processors,and/or various other components.

The secondary processing module 116 may output the three phase currents(i_(a), i_(b), i_(c)) and/or direct current voltage to one or morecomponents of the control system and/or electronic data processingsystem 120. For example, the secondary processing module 116 may outputeach of the three phase currents (i_(a), i_(b), i_(c)) to the phaseconverter 113, and may output the direct current voltage (V_(DC)) to thecalculation module 110. Alternatively the secondary processing module116 may output one or both of the three phase currents (i_(a), i_(b),i_(c)) and/or direct current voltage (V_(DC)) to various othercomponents of the control system.

The phase converter 113, which may in some systems be referred to as athree-phase to two-phase current Park transformation module, may receiveoutputs from one or both of the primary processing module 114 and thesecondary processing module 116. For example, as in FIG. 1, the phaseconverter may receive the three phase currents (i_(a), i_(b), i_(c)) ofthe motor from the secondary processing module 116, as well as positiondata (θ) from the primary processing module 114. Other inputs arepossible.

The phase converter 113 may convert the three phase currents (i_(a),i_(b), i_(c)) and position data (θ) from a three phase digitalrepresentation of measured current in the motor 117 into a correspondingtwo phase digital representation of the measured current. The two phaserepresentation of the digital current may be a current signalrepresented in a dq-axis, and/or may have a d-axis current component anda q-axis current component. For example, the phase converter 113 mayapply a Park transformation or other conversion equations to convert themeasured three-phase representations of current (i_(a), i_(b), i_(c))into two-phase representations of current (i_(d), i_(q)) using thecurrent data from the secondary processing module 116 and the positiondata from the primary processing module 114 and/or sensor 115.

The two phase representation of current (i_(d), i_(q)) may be d-q axiscurrent, and may refer to a direct axis current (i_(d)) and a quadratureaxis current (i_(q)), as applicable in the context of vector-controlledalternating current machines, such as the motor 117.

The two-phase current (i_(d), i_(q)) may be output from the phaseconverter 113 module another component of the control system and/orelectronic data processing system 120, such as the current regulationcontroller 111. Other outputs from the phase converter 113 are possible,and may be output to other components of the control system and/orelectronic data processing system 120.

The phase converter 113 may include one or more digital signalprocessors, field programmable gate arrays, other processors, and/orvarious other components. In addition or alternatively, the phaseconverter 113 may be included in one or more digital signal processors,field programmable gate arrays, other processors, and/or various othercomponents. For example, in some system, the phase converter 113 and thesecondary processing system 116, or the functionality of the phaseconverter 113 and/or the secondary processing system 116, may beincluded in a combination of a digital signal processor and a fieldprogrammable gate array. Other configurations may be possible.

The electronic data processing system 120 may include a calculationmodule 110. The calculation module 110 may receive outputs from theprimary processing module 114 and the secondary processing module 116.For example, the primary processing module 114 may provide speed data(such as the revolutions per minute of the mechanical shaft 126).Additionally or alternatively, the secondary processing module 116 mayprovide a measured level of direct current voltage.

The calculation module 110 may process, determine, calculate, estimate,or otherwise identify a voltage-over-speed ratio, or other data, fromthe received outputs of the processing module 114 and/or the secondaryprocessing module 116. For example, the calculation module 110 maydivide the received direct current voltage by the received speed data todetermine a voltage-over-speed ratio, such as the adjustedvoltage-over-speed ratio 318. Other calculations or comparisons arepossible.

Additionally, the direct current voltage level of the power supply thatsupplies the inverter circuit 188 with electrical energy may fluctuateor vary because of various factors, including, but not limited to,ambient temperature, battery condition, battery charge state, batteryresistance or reactance, fuel cell state (if applicable), motor loadconditions, respective motor torque and corresponding operational speed,and vehicle electrical loads (e.g., electrically driven air-conditioningcompressor). The calculation module 110 may adjust and/or impact currentcommands generated by the d-q axis current generation manager 109 tocompensate for fluctuation or variation in the direct current busvoltage, among other things. Such adjustments may be made, implemented,and/or reflected in an adjusted voltage-over-speed ratio 318.

One or more outputs of the calculation module 110 may be transmitted,output, fed, sent, and/or otherwise communicated to the dq-axis currentgeneration manager 109.

The torque command generation module 105 may also, or alternatively, beattached, connected, coupled, and/or otherwise in communication with thedq-axis current generation manager 109.

The torque command generation module 105 may itself receive an input,such as an input from the vehicle data bus 118. The vehicle data bus 118may, for example, be a controller area network (CAN) or other network.The vehicle data bus may in some systems include wired networks,wireless networks, or combinations thereof. Further, the network may bea public network, such as the Internet, a private network, such as anintranet, or combinations thereof, and may utilize a variety ofnetworking protocols now available or later developed including, but notlimited to TCP/IP based networking protocols.

The torque command generation module 105 may take the received signal ortorque command from the vehicle data bus 118, and may calculate,identify, estimate, and/or generate torque command data 316 based on thereceived signal. For example, where the received signal indicates thatan acceleration pedal has been pressed, the torque command generationmodule 105 may generate a command and/or torque command data 316 forincreased torque and/or power to be sent to the motor 117. Otherreceived signals and commands are possible.

The torque command generation module 105 may include a lookup tablewhich the torque command generation module 105 may use to compare and/orlook up an input command received by the torque command generationmodule 105 to identify and/or generate the resulting torque command data316 in response to the received input command. In other systems, thetorque command generation module 105 may process the received input, andmay output the processed signal to the dq-axis current generationmanager 109, without using or referring to a lookup table, such as byusing one or more algorithms and/or rules based logic.

The torque command generation module 105 may be output, transmitted,and/or otherwise communicated to the dq-axis current generation manager109.

The dq-axis current generation manager 109, which may also be referredto and/or include dq-axis current generation look-up tables, may receivethe torque command data 316 from the torque command generation module105. The dq-axis current generation manager 109 may also oralternatively receive adjusted voltage-over-speed ratio data 318 fromthe calculation module 110.

The dq-axis current generation manager 109 may use the received torquecommand data 316 and/or voltage-over-speed data 318 to look up,determine, select, and/or generate direct axis current command data(such as a d-axis current command (i_(d)*)) and/or quadrature axiscurrent command data (such as a q-axis current command (i_(q)*)). Forexample, the dq-axis current generation manager 109 may select and/ordetermine the direct axis current command and the quadrature axiscurrent command by accessing one or more of the following: (1) a look-uptable, database or other data structure that relates respective torquecommand data 316 and/or adjusted voltage-over-speed data 318 tocorresponding direct and quadrature axes currents (i_(d)*, i_(q)*), (2)a set of quadratic equations or linear equations that relate respectivetorque command data 316 and/or adjusted voltage-over-speed data 318 tocorresponding direct and quadrature axes currents (i_(d)*, i_(q)*),and/or (3) a set of rules (such as if-then rules) and/or logic thatrelate respective torque command data 316 and/or adjustedvoltages-over-speed data 318 to corresponding direct and quadrature axescurrents (i_(d)*, i_(q)*). Where the dq-axis current generation module109 uses a lookup table, the lookup table may be a part of the dq-axiscurrent generation module 109, and/or may be accessible to the dq-axiscurrent generation module 109. The lookup table may, for example, be athree dimensional lookup table.

The output of the dq-axis current generation manager 109 may be sent,fed, transmitted, and/or otherwise communicated to a summer 119. WhileFIG. 1 shows a system with a summer 119 which may sum an output of thedq-axis current generation manager 109 and an output of the currentadjustment module 107, in other systems where the current adjustmentmodule 107 and/or feedback controls are not desired, required, orenabled, the output from the current generation manager 109 may be feddirectly to the current regulation controller 111.

An output of the current adjustment module 107 may reflect one or moreadjustment factors, such as one or more adjustment factors or commandsdetermined and/or transmitted the rotor magnet temperature estimationmodule 104, the current shaping module 106, and/or the terminal voltagefeedback module 108.

The rotor magnet temperature estimation module 104 may be connected to,attached to, in communication with, coupled to, monitor, or otherwiseestimate or determine the temperature of one or more components of themotor 117. For example, the rotor magnet temperature estimation module104 may estimate or determine the temperature of a rotor permanentmagnet or magnets.

For example, in some embodiments, the rotor magnet temperatureestimation module 104 may estimate the temperature of the rotor magnetsfrom one or more sensors located on the stator, in thermal communicationwith the stator, or secured to the housing of the motor 117. In otherembodiments, the rotor magnet temperature estimation module 104 may bereplaced with a temperature detector (e.g., a thermistor and wirelesstransmitter like infrared thermal sensor) mounted on the rotor or themagnet, where the detector may provide a signal, such as a wirelesssignal, which may be indicative of the temperature of the magnet ormagnets.

In response to and/or based on a measured temperature and/or estimatedchange in rotor temperature, the rotor magnet temperature estimationmodule 104 may generate an adjustment of the q-axis current commandand/or the d-axis current command. The adjustment may be in the form ofan adjustment current command, an adjustment signal, adjustment factor,and/or adjustment data to be sent to the current adjustment module 107.The adjustment may be sent, fed, transmitted, and/or otherwisecommunicated to the current adjustment module 107.

Alternatively or additionally, the system may include a current shapingmodule 106. The current shaping module 106 may, for example, measure,calculate, estimate, monitor, and/or otherwise identify one or morefactors or features of the motor 117. For example, the current shapingmodule 106 may identify a torque load on the motor 117 and/or a speed ofthe motor 117. Other factors and/or features are possible.

The current shaping module 106 may determine a correction or adjustmentof the quadrature axis (q-axis) current command and the direct axis(d-axis) current command based on one or more of the factors orfeatures, such as the torque load on the motor 117 and speed of themotor 117. The correction and/or adjustment may be in the form of anadjustment current command, an adjustment signal, adjustment factor,and/or adjustment data to be sent to the current adjustment module 107.This correction and/or adjustment may be sent, fed, transmitted, and/orotherwise communicated to the current adjustment module 107.

Alternatively or additionally, the system may include a terminal voltagefeedback module 108. The terminal voltage feedback module 108 may, forexample, calculate a voltage supply limit, such as by sampling thevoltage supply magnitude each PWM cycle, and applying a limitcoefficient to the voltage supply, such as 1/√3, or 0.95/√3, or othercoefficients. The terminal voltage feedback module 108 may also samplethe terminal voltage command from the current regulation controller 111.The terminal voltage feedback module 108 may compare the terminalvoltage command to the voltage limit, and may generate an adjustmentcommand to be sent to the command generation module 107, whenever theterminal voltage command is greater than the voltage limit. Thisadjustment command may, for example, be a d-axis current adjustmentcommand, and may be intended to reduce the terminal voltage commandgenerated by the current regulation controller 111.

The correction and/or adjustment may be in the form of an adjustmentcurrent command, an adjustment signal, an adjustment factor, and/oradjustment data to be sent to the current adjustment module 107. Theadjustment command from the terminal voltage feedback module 108 may besent, fed, transmitted, and/or otherwise communicated to the currentadjustment module 107.

As mentioned, one or more of the rotor magnet temperature estimationmodule 104, the current shaping module 106, and the terminal voltagefeedback module 108 may be coupled to and/or are capable ofcommunicating with the dq-axis current adjustment module 107.

The current adjustment module 107 may gather the adjustment signals,adjustment factors, adjustment commands, and/or adjustment data from oneor more of the rotor magnet temperature estimation module 104, thecurrent shaping module 106, and the terminal voltage feedback module108. The current adjustment module 107 may add, aggregate, assimilate,compile, and/or otherwise account for the adjustment data and/orcommands from each of the rotor magnet temperature estimation module104, the current shaping module 106, and the terminal voltage feedbackmodule 108, and using this data, may generate and/or create a completeor total adjustment command. Where the gathered adjustment data includesadjustment commands, the current adjustment module 107 may aggregate,sum, and/or combine the adjustment commands together to form oneadjustment command. In other circumstances, the current adjustmentmodule 107 may need to further process the adjustment commands to obtaina signal which may be summed at the summation block 119. This completeor total adjustment command may also be referred to, for example, as anadjustment command, an adjusted d-axis current command, a d-axis currentadjustment command, or a d-axis current adjustment.

The current adjustment module 107 may provide this d-axis currentadjustment data, such as the adjusted d-axis current command, to adjustthe direct axis current command data based on input data from the rotormagnet temperature estimation module 104, the current shaping module106, and terminal voltage feedback module 108.

In turn, the current adjustment module 107 may communicate with thedq-axis current generation manager 109 or the summer 119. For example,the current adjustment module 107 may send, feed, transmit, and/orotherwise communicate the d-axis current adjustment command to thesummer 119, which may add the d-axis current adjustment command togetherwith an output from the dq-axis current generation manager 109.

While FIG. 1 shows each of the rotor magnet temperature estimationmodule 104, the current shaping module 106, and the terminal voltagefeedback module 108 as being connected to the current adjustment module107, and one output from the current adjustment module 107 being fed tothe summation block 119, other configurations are possible. For example,where the rotor magnet temperature estimation module 104 and the currentshaping module 106 are not included or are disabled, an output from theterminal voltage feedback module 108 may be transmitted directly to thesummer 119. Various other configurations are possible.

The summer 119, which in some systems may be referred to as a summationblock or summation module, may receive the dq-current command from thedq-axis current generation manager 109. The summer 119 may also oralternatively receive the d-axis current adjustment command from thecurrent adjustment module 107. The summer 119 may add the d-axis currentadjustment command to the dq-current command, and may output an adjustedcurrent command. The adjusted current command may be represented as atwo-phase current command (i_(d)*, i_(q)*).

While FIG. 1 depicts the dq-axis current adjustment command beingtransmitted to the summer 119, in some systems, the dq-axis currentadjustment command may be transmitted directly to the dq-axis currentgeneration manager 109, and/or may be used by the dq-axis currentgeneration manager to select a proper current command to be used incontrolling and/or powering the motor 117.

The adjusted current command from the summer 119 may be sent, fed,transmitted, and/or otherwise communicated to the current regulationcontroller 111. As mentioned, the current regulation controller 111 mayalso receive the actual two-phase currents (i_(d), i_(q)) from the phaseconverter 113.

The current regulation controller 111 may process the respective dq-axiscurrent commands (e.g., i_(d)* and i_(q)*) and actual dq-axis currents(e.g., i_(d) and i_(q)) received, and may output one or morecorresponding dq-axis voltage commands (e.g., v_(d)* and v_(q)*commands) based on the processed inputs. These dq-axis voltage commands(v_(d)*, v_(q)*) may be two-phase voltage commands, and may be sent,fed, transmitted, and/or otherwise communicated to the generation module112.

The generation module 112, which may be a pulse-width modulation (PWM)generation module, such as a space vector PWM generation module, mayreceive the voltage commands, such as the two-phase voltage commands(v_(d)*, v_(q)*), from the current regulation controller 111. Thegeneration module may generate a three phase voltage command based onthe received terminal voltage command. For example, the generationmodule 112 may convert the direct axis voltage and quadrature axisvoltage commands (v_(d)*, v_(q)*) from two phase data representationsinto three phase representations, such as v_(a)*, v_(b)* and v_(c)*. Thethree phase representations v_(a)*, v_(b)* and v_(c)* may, in somesystems, represent a desired voltage to control the motor 117.

The three phase voltage command representations (v_(a)*, v_(b)*, andv_(c)*) may be transmitted, fed, sent, and/or communicated to theinverter switching circuit 188. The inverter switching circuit 188 maygenerate the three phase voltage commands for controlling the motor 117.The three phase voltage commands may be based on the three phase voltagecommand signals (v_(a)*, v_(b)*, and v_(c)*) received from thegeneration module 112. In at least this way, the control system may beoperated to control the motor 117.

In some systems and/or embodiments, the generation module 112 may bepowered by the same power supply previously discussed with respect tothe inverter switching circuit 188. In some systems, the generationmodule 112 and the inverter switching circuit 188 may be part of thesame component, and may receive the two phase voltage command from thecurrent regulation controller 111 and may output a three phase voltagecommand to the motor 117 to drive the motor 117.

FIG. 2 illustrates an example of the control system. The control systemof FIG. 2 may include an electronic data processor 264, a data bus 262,a data storage device 260, and one or more data ports (268, 270, 272,274 and 276). The control system of FIG. 2 may include all or part ofthe electronic data processing system 120 of FIG. 1. The data processor264, the data storage device 260 and one or more data ports may becoupled to the data bus 262 to support communications of data between oramong the data processor 264, the data storage device 260 and one ormore data ports. Like numbered components in FIG. 2 may be constructedand/or function in the same or similar manner as the same components inFIG. 1.

The control system, the electronic data processing system 120 and/orvarious components of the electronic data processing system 120 may beor may include one or more computing devices of various kinds, such as acomputer system. The computer system can include a set of instructionsthat can be executed to cause the computer system to perform any one ormore of the methods or computer based functions disclosed herein. Thecomputer system may operate as a standalone device or may be connected,e.g., using a network, to other computer systems or peripheral devices.The computer system may include computers, processor, and/or otherprogrammable apparatus. Actions of the computers, processor, and/orother programmable apparatus may be directed by computer programs,applications and/or other forms of software. Memory in, used with, orused by the control system, such as computer-readable memory, may beused to direct the computers, processor, and/or other programmableapparatus to function in a particular manner when used by the computers,processor, and/or other programmable apparatus. Methods of controllingmotors, such as described by flowcharts herein, may be performed as aseries of operational steps on or with the aid of the computers,processor, and/or other programmable apparatus.

In a networked deployment, the computer system may operate in thecapacity of a server or as a client user computer in a server-clientuser network environment. The computer system may include a processor,e.g., a central processing unit (CPU), a graphics processing unit (GPU),or both. For example, the control system and/or electronic dataprocessing system 120 may include the data processor 264 shown in FIG.2.

The data processor 264 may be a component in a variety of systems. Forexample, the processor may be part of a standard personal computer or aworkstation. The processor may be one or more general processors,digital signal processors, application specific integrated circuits,field programmable gate arrays, servers, networks, digital circuits,analog circuits, combinations thereof, or other now known or laterdeveloped devices for analyzing and processing data. The data processor264 may include one or more of an electronic data processor, amicroprocessor, a microcontroller, a programmable logic array, a logiccircuit, an arithmetic logic unit, an application specific integratedcircuit, a digital signal processor, a proportional-integral-derivative(PID) controller, or another data processing device. The processor mayimplement a software program, such as code generated manually (i.e.,programmed).

The data processor 264 may be coupled to the electronic data processingsystem 120, one or more of the ports 268, 270, 272, 274, and 276, and/orthe data storage device 260. The data processor 264 may conduct orassist with various processing implemented in the electronic dataprocessing system 120. For example, logic and/or software implementingfeatures and functions of the electronic data processing system 120 maybe partially or entirely executed by the data processor 264.

The data processor 264 may be connected to the data bus 262. The databus 262 may include one or more data buses. The data bus 262 may be anyof a variety of data buses or combinations of data buses. One or morecomponents of the control system may be coupled to the data bus 262,such as to facilitate and/or support communication between components.For example, the data processor 264, the data storage device 260 and oneor more data ports (268, 270, 272, 274, and 276) are coupled to the databus 262 to support communications of data between or among the dataprocessor 264, the data storage device 260 and one or more data ports.

The data storage device 260 may store and/or include all or part of theelectronic data processing system 120. For example, in FIG. 2, thesensing circuit 124, the analog-to-digital converter 122, the primaryprocessing module 114, the secondary processing module 116, the phaseconverter 113, the calculation module 110, the dq-axis currentgeneration manager 109, the summer or summation module 119, the currentshaping module 106, the rotor magnet temperature estimation module 104,the terminal voltage feedback module 108, the current adjustment module107, the torque command generation module 105, the current regulationcontroller 111, and/or the generation module 112 may be included inand/or in communication with the data storage device 260. Fewer or morecomponents may be included with the data storage device 260.Additionally or alternatively, more or less data storage devices 260 maybe used for all or part of the electronic data processing system 120.

The data storage device 260 may comprise any magnetic, electronic, oroptical device for storing data. For example, the data storage device260 may comprise an electronic data storage device, an electronicmemory, non-volatile electronic random access memory, one or moreelectronic data registers, data latches, a magnetic disc drive, a harddisc drive, an optical disc drive, or the like.

The data storage device 260 may include a memory. The memory may be amain memory, a static memory, or a dynamic memory. The memory mayinclude, but is not limited to computer readable storage media such asvarious types of volatile and non-volatile storage media, including butnot limited to random access memory, read-only memory, programmableread-only memory, electrically programmable read-only memory,electrically erasable read-only memory, flash memory, magnetic tape ordisk, optical media and the like. In one embodiment, the memory includesa cache or random access memory for the processor. In alternativeembodiments, the memory is separate from the processor, such as a cachememory of a processor, the system memory, or other memory. The memorymay be an external storage device or database for storing data. Examplesinclude a hard drive, compact disc (“CD”), digital video disc (“DVD”),memory card, memory stick, floppy disc, universal serial bus (“USB”)memory device, or any other device operative to store data. The memoryis operable to store instructions executable by the processor. Thefunctions, acts or tasks illustrated in the figures or described hereinmay be performed by the programmed processor executing the instructionsstored in the memory. The functions, acts or tasks are independent ofthe particular type of instructions set, storage media, processor orprocessing strategy and may be performed by software, hardware,integrated circuits, firm-ware, micro-code and the like, operating aloneor in combination. Likewise, processing strategies may includemultiprocessing, multitasking, parallel processing and the like.

The term “computer-readable medium” may include a single medium ormultiple media, such as a centralized or distributed database, and/orassociated caches and servers that store one or more sets ofinstructions. The term “computer-readable medium” may also include anymedium that is capable of storing, encoding or carrying a set ofinstructions for execution by a processor or that cause a computersystem to perform any one or more of the methods or operations disclosedherein. The “computer-readable medium” may be non-transitory, and may betangible.

In a particular non-limiting, exemplary embodiment, thecomputer-readable medium can include a solid-state memory such as amemory card or other package that houses one or more non-volatileread-only memories. Further, the computer-readable medium can be arandom access memory or other volatile re-writable memory. Additionally,the computer-readable medium can include a magneto-optical or opticalmedium, such as a disk or tapes or other storage device to capturecarrier wave signals such as a signal communicated over a transmissionmedium. A digital file attachment to an e-mail or other self-containedinformation archive or set of archives may be considered a distributionmedium that is a tangible storage medium. Accordingly, the disclosure isconsidered to include any one or more of a computer-readable medium or adistribution medium and other equivalents and successor media, in whichdata or instructions may be stored.

In an alternative embodiment, dedicated hardware implementations, suchas application specific integrated circuits, programmable logic arraysand other hardware devices, can be constructed to implement one or moreof the methods described herein. Applications that may include theapparatus and systems of various embodiments can broadly include avariety of electronic and computer systems. One or more embodimentsdescribed herein may implement functions using two or more specificinterconnected hardware modules or devices with related control and datasignals that can be communicated between and through the modules, or asportions of an application-specific integrated circuit. Accordingly, thepresent system encompasses software, firmware, and hardwareimplementations.

The data ports 268, 270, 272, 274, and/or 276 may represent inputs,ports, and/or other connections to the data bus 262, data storage device260, and/or the data processor 264. The data ports 268, 270, 272, 274,and/or 276 of the control system in FIG. 2 may also, or alternatively,be coupled to one or more components of the motor 117, the controlsystem, user interfaces, displays, sensors, converters, and/or othercircuits. Each data port may comprise a transceiver and buffer memory,for example. In some systems, each data port may comprise any serial orparallel input/output port.

For example, a controller 266, such as a pedal to a vehicle or otheruser interface, may be connected, attached, coupled to, and/or incommunication with a vehicle data bus 118. The operator of a vehicle maygenerate the torque commands via a user interface, such as a throttle, apedal, a controller 266, or other control device. The generated torquecommands may be a control data message, such as a speed control datamessage, a voltage control data message, or a torque control datamessage. The vehicle data bus 118 may provide data bus messages withtorque commands to the torque command generation module 105 via thefirst data port 268. Various other inputs and/or messages may bereceived by the torque command generation module 105.

The electronic data processing system 120 may include other inputdevices configured to allow a user to interact with any of thecomponents of system, such a number pad, a keyboard, or a cursor controldevice, such as a mouse, or a joystick, touch screen display, remotecontrol or any other device operative to interact with the computersystem. In at least this way, the torque command generation module 105may be associated with or supported by the first data port 268 of theelectronic data processing system 120.

Alternatively or additionally, inverter switching circuit 188 may becoupled to the data bus 262 such as, for example, a second data port270, which may in turn be coupled to the data bus 262. Additionally oralternatively, the sensor 115 and/or the primary processing module 114may be coupled to a third data port 272, which in turn may be coupled tothe data bus 262. Additionally or alternatively, the sensing circuit 124may be coupled to the analog-to-digital converter 122, which may becoupled to a fourth data port 274. Additionally or alternatively, theterminal voltage feedback module 108 may be coupled to the fifth dataport 276, which in turn may be coupled to the data bus 262.

While the data ports are designated first, second, third, etc., no ordermay be attached to the data ports, and more or less inputs and/orcomponents may be attached to any one data port, and/or one or more dataports may be combined into one data port. The data ports may facilitateproviding inputs to the electronic data processing system 120.

Though not shown, the control system and/or electronic data processingsystem 120 may further include a display unit, such as a liquid crystaldisplay (LCD), an organic light emitting diode (OLED), a flat paneldisplay, a solid state display, a cathode ray tube (CRT), a projector, aprinter or other now known or later developed display device foroutputting determined information. The display may act as an interfacefor the user to see the functioning of the processor, or specifically asan interface with the software stored in the memory or in the driveunit.

Additionally, the electronic data processing system 120 and/or controlsystem may also include a disk or optical drive unit. The disk driveunit may include a computer-readable medium in which one or more sets ofinstructions, e.g. software, can be embedded. Further, the instructionsmay embody one or more of the methods or logic as described herein. In aparticular embodiment, the instructions may reside completely, or atleast partially, within the memory and/or within the processor duringexecution by the computer system. The memory and the processor also mayinclude computer-readable media as discussed above.

In accordance with various embodiments of the present disclosure, themethods described herein may be implemented by software programsexecutable by a computer system. Further, in an exemplary, non-limitedembodiment, implementations can include distributed processing,component/object distributed processing, and parallel processing.Alternatively, virtual computer system processing can be constructed toimplement one or more of the methods or functionality as describedherein.

The current of the motor 117 may be monitored and/or measured in anumber of ways. The measured current magnitude of a motor 117 may relyon and/or depend on one or more factors. For example, a measured currentmagnitude may rely on a current sensing instant, a current transducerscaling drift, a pulse width modulation switching frequency selection,and/or a PI gain selection.

Proper measurement of the current in the motor 117 may be made easierby, and/or require that, a correct or nearly correct current magnitudemeasured from the motor 117. In particular, it may be helpful ornecessary to calibrate the system so that the current of the motor 117is measured at a particular instant, also referred to as a currentsensing instant. For example, one may wish to ensure that the current ofthe motor 117 is measured at an averaging or averaged point of a currentsignal. This may be necessary, for example, to provide an accuratefeedback to current regulation controller 111.

As discussed, a generation module 112 and/or inverter switching circuit188 may generate the voltage command which, in turn, may be sent ortransmitted to the motor 117. Where, for example, the generation module112 is a space-vector pulse width modulation generation module, thevoltage command may generate a three phase current which may include aripple component. As the below equation for an applied machine phaseterminal to floating neutral voltage (v_(an)) illustrates, the ripplecomponent may be twice the PWM switching frequency:v _(an) =r _(s) i _(s) +L(di _(a) /dt)−ω_(e)λ_(f) sin(θ)where L is the phase inductance and ω_(e) is an electrical frequency,and λ_(f) is a phase back emf. The above equation indicates that thecurrent ripple magnitude may be mainly determined by L (phaseinductance) and the PWM switching frequency, which may be inverselyproportion to the voltage duration.

One or more factors may arise which may make sensing the current at anaveraging point difficult. For example, the control system mayexperience one or more delays, such as a hardware circuit phase delay, acurrent samples processing or filtering delay, a current reading delay,and/or a power switches deadtime delay.

If a current sensing instant experiences a delay and/or is not tuned toaccurately sense the current of the motor at the right instant, anyfeedback systems relying on such measurements may be disadvantagedand/or may not operate properly. For example, an incorrect feedbackcurrent caused by an improperly timed current sensing instant may leadto a mismatching between a current command and an actual current rmsvalue, which may lead to an unstable control system.

Accordingly, it may be beneficial to calibrate the current sensinginstant to account for one or more of the above described delays. Forexample, one may fine tune and/or otherwise set a current sensinginstant based on an operation of the motor 117 in a braking mode and/ora motoring mode.

It should be noted that while a current sensing instant may be describedas an instant at which a current signal is sensed, in some systems andmethods, the current may be constantly sensed, and the current sensinginstant may merely refer to the instant at which the constantly sensedcurrent is latched or otherwise grabbed or obtained and sent for furtherprocessing and/or analysis. The current sensing instant may beconfigured to latch a current value from a set of current signals whichmay be constantly received such that the current sensing instantcorresponds to an averaging point of a rising or falling current slope.

As mentioned, a measured current magnitude of a motor 117 may rely onand/or depend on a current sensing instant, a current transducer scalingdrift, a pulse width modulation switching frequency selection, and/or aPI gain selection. Among these, only the current sensing instantdemonstrates opposite effects when the motor is operating in a brakingmode and a motoring mode.

FIG. 3 shows an example signal 305, such as a signal generated by apulse width modulation generation module 112. The signal 305 may be abase carrier waveform, such as a PWM carrier signal or waveform used byPWM generation modules for phase A, B, and C to generate respectivepulse width modulated voltage signals to be sent to three terminals ofthe motor 117. The generated motor terminal pulse width modulatedvoltage signals may be represented as signals 315, 317, and 319respectively. A phase terminal with respect to floating neutral voltage,such as a phase A with respect to floating neutral voltage, may berepresented as voltage Van 310, and may be obtained based on voltagesignals 315, 317, and 319.

In FIG. 3, the current signal 340 corresponds to an ideal currentsignal, or current signal experiencing no delay, from the motor 117 whenthe motor is operating in a motoring mode, where the current signal doesnot experience any delays. The current signal 345 corresponds to anideal current signal from the motor 117 when the motor is operating in abraking mode (or generating mode). As mentioned, the frequency of thecurrent signals 340 and 345 is twice that of the PWM carrier signal 305,and contains a ripple effect. Accordingly, it is important to measurethe current signal 340 at an averaging point of the current signal, suchas averaging points 320A, 320B, 320C, 320D, and 320E. Similarly, it isimportant to measure the current signal 345 at averaging points 325A,325B, 325D, and 325E.

However, when a current sensing instant is earlier than the ripplecurrent averaging instant, different effects may be demonstrated in eachof the braking mode and the motoring mode. In the motoring mode, ahigher magnitude may be measured, which may lead to a higher magnitudein a current feedback system, and a lower magnitude in actual current.In contrast, in the braking mode, a lower magnitude of current may bemeasured, which may lead to a lower magnitude value in the currentfeedback system, and a higher magnitude in actual current.

When instead the current sensing instant is later than the ripplecurrent averaging instant, the results are reversed. In the motoringmode, a lower magnitude of current may be measured, which may lead to alower magnitude in a current feedback system, and a higher magnitude inactual current. In the alternative, in the braking mode, a highermagnitude of current may be measured, which may lead to a highermagnitude value in the current feedback system, and a lower magnitude inactual current.

These features and/or characteristics of the system may provide for away of calibrating the current sensing instant. The method of FIG. 4offers one way of calibrating the current sensing instant utilizingthese characteristics.

The method of FIG. 4 may begin at block 402, where a current sensinginstant for which to latch a sensed current signal may be identified.

In block 404, a current command may be provided to a motor 117 tocontrol the motor 117 while the motor is operating in a motoring mode ata shaft speed. The current command may, for example, be a currentcommand that includes a current magnitude at a Gamma angle. The motor117 may be operated at a set and/or determined shaft speed.

At block 406, an actual current may be monitored and/or measured fromthe motor 117 when the motor is controlled by the current command andoperates in a motoring mode. For example, an actual averaging rmscurrent magnitude of a three phase motor 117 operating in the motoringmode in response to the current command may be sensed and/or monitoredat the current sensing instant identified in block 402. The monitoringand/or measuring may be done as using a power analyzer, oscilloscope,Labview, or other monitoring or measuring devices.

In block 408, one may feed, transmit, and/or otherwise run a matching,same, and/or identical current command. The matching current commandmay, for example, include the same current magnitude at the same Gammaangle. The matching current command may be sent to the same motor 117operating in the braking mode at the same shaft speed. In some systems,the braking mode may be an operation of the motor at the same shaftspeed but in an opposite rotational direction than the motoring mode.

In block 410, an actual current may be monitored and/or measured fromthe motor 117 when the motor is controlled by the current command andoperates in a braking (or generating) mode. For example, a second actualaveraging rms current magnitude of a three phase motor 117 operating inthe braking mode in response to the same current command may be sensedand/or monitored at the current sensing instant identified in block 402.The monitoring and/or measuring may be done as using a power analyzer,oscilloscope, Labview, or other monitoring or measuring devices.

While the method of FIG. 4 shows performing blocks 404 and 406 beforeblocks 408 and 410, one may modify the order of the method to performblocks 408 and 410 before blocks 404 and 406, or to perform these blockssimultaneously.

In block 412, the measured actual averaging current of the motor 117 inthe motoring mode at the current instant may be compared to the measuredactual averaging current of the motor 117 in the braking mode at thecurrent instant.

The best, ideal, and/or correct current sensing instant, may be wherethe measured actual averaging currents of the motor 117 are the samewhen the motor is in the motoring mode and in the braking mode.Accordingly, when these measured, or observed, actual averaging currentsare equal, the method may proceed to block 414, where the currentsensing instant may be considered calibrated and/or used throughoutsubsequent operations of the motor with confidence that the currentsensing instant is accurately measuring and/or monitoring the currentsignal at the proper averaging instant.

If, alternatively, the measured or observed actual averaging currents ofthe motor 117 are not the same in the motoring mode as in the brakingmode, the method may proceed to block 416, where the identified currentsensing instant from block 402 may be adjusted. For example, analgorithm, lookup table, and/or rules or logic may compare thedifferences of the actual measured averaging currents and may determinein which time direction to adjust the current sensing instant. Forexample, an algorithm may adjust the current sensing instant to measurea later instant where the measured actual averaging current of the motor117 in the motoring mode is higher than the measured actual averagingcurrent of the motor 117 in the braking mode, and vice versa. Thisprocedure may be referred to as tuning the current sensing instant. Insome methods, the current sensing instant may be adjusted for each pulsewidth modulation cycle. Other methods and/or procedures are possible.

After block 416, the method may return to block 404, and proceed againthrough the method of FIG. 4 until block 412 is again reached. If atblock 412 the measured actual currents of the motor 117 in motoring modeand in braking mode are equal, the method proceeds to block 414, and ifnot, the method returns to block 416 and the process repeats.

A modified version of the method of FIG. 4 may ignore blocks 402 and416. In this modified version, the method may be begin by running acommand through the motor 117 in a motoring mode, and continuouslysensing the current from the motor 117. Similarly, the motor may becommanded by the same command, while operating at the same shaft speed,while the motor 117 operates in a braking mode. The current may becontinuously sensed during this operation as well. In this modifiedversion of the method, block 412 may be replaced by a block ofcalculating the current sensing instant based on the entire currentsensed for each mode. For example, one may compare the two sensedcurrent signals and identify an instant at which the values of thesensed current signals are equal. This may then be identified at block412 as the current sensing instant.

The blocks of FIG. 4 may all, or partially, be carried out by aprocessor, such as data processor 264, by either the primary processingmodule 114 or the secondary processing module 116, or any other internalor external processor or modules. Alternatively or in addition, anexternal routine and diagnostic calibration module or system may beimplemented for calculating and/or calibrating the current sensinginstant.

In at least this way, by comparing the actual averaging current of themotor 117 in the motoring mode with the actual averaging current of themotor 117 in the braking mode, one may determine the points at which theactual averaging currents are equal. The current sensing instant maythen be identified and/or configured, so that current is sensed and/orlatched at precisely those points.

Additionally or alternatively, one may calibrate a correct currentsensing instant in other ways. In some methods, one may calculate anamount of correction for each of the hardware phase delay, currentsamples processing delay, current reading delay and deadtime currentphase delays individually. An example of a method similar to this isshown in FIG. 5.

The method of FIG. 5 may begin at block 502, where a hardware circuitphase delay may be measured.

As mentioned, the control system may experience a hardware delay. Ahardware delay may, for example, result from and/or be associated with acurrent transducer attached to or otherwise coupled with the motor 117.Alternatively or in addition, hardware delays may result from the use ofone or more filters, such as a low-pass anti-aliasing filter, and/oroperational amplifiers, such as those used to adjust analog signalscaling and offset. Alternatively or in addition, hardware delays mayresult from the use of an analog-to-digital converter, which may haveand/or cause sampling and/or hold delays.

Hardware delays from a filter, such as a low-pass anti-aliasing filter,operational amplifiers, and an analog-to-digital converter may notrequire extensive testing, but instead may be easy to calculate and/orestimate by analytical analysis. In circumstances where a hardware delayis due to the current transducer, phase delay may not be explicit from amanufacturer's product sheet, and as a result, may need to be manuallytested for, calibrated, and/or determined.

Any hardware circuit phase delay may be measured in many ways. Forexample, in one way, a pair of measuring devices, and/or a measuringdevice with two ports, may be used. One measuring device may beconnected to the motor and/or receive the signal immediately output fromthe motor 117, and the second measuring device may be connected toand/or receive the signal from the motor 117 after it has passed throughthe hardware circuitry of the system, and/or right before it is receivedby a field programmable gate array, such as field programmable gatearray 870 discussed below, or other digital storage and computingdevice, such as a complex programmable logic device (CPLD) or otherdevice. Both of the signals may be displayed, and/or compared to eachother, and a delay in the second signal may be easily measured and orcalculated based on the comparison. Other methods of measuring thisdelay may be possible.

At block 504, a current samples processing or filtering delay may bemeasured. The control system may experience delays associated withprocessing current sample. Current samples processing delays may result,for example, from digital filters on samples, such as an FIR filter in afield programmable gate array which may be used to remove noise in thecurrent signal. In some circumstances, this delay can be explicitlycalculated based on filter design parameters and/or using software orother logic to account for any delays. This delay may, for example, be asoftware delay. Delays resulting from scaling and/or offsetting asampled digital current may not be likely to cause any negligible delay.

This current sample processing or filtering delay may be preciselyderived mathematical equations carried out by the software and/or thefield programmable gate array or other type of digital storage and/orcomputing device. This delay may be a constant in some systems. Othermethods of calculation or estimation may be possible.

At block 506, the current reading delay may be estimated or calculated.A control system may experience delays associated with reading acurrent. Current reading delay may be caused by and/or result from, forexample, controllers or other components, such as when current samplesare commanded to be read into the current regulation controller 111 forcurrent-position synchronization and/or transformation. For example,transferring a signal between a field programmable gate array and adigital signal processor, such as the field programmable gate array 870and the digital signal processor 850 discussed below with respect toFIG. 8, may be accomplished using a parallel bus between thesecomponents connecting them, and there may be a delay associated withsending signal from one to the other. In some systems, only the latestcurrent samples may be read by the current regulation controller 111. Assuch, these delays may have a small varying time delay and/or smallaveraging effects to be considered. In some systems, when a currentreading command reading arrives, the latest current samples may just beavailable or have been available for one or a few clock cycles,depending on how fast raw currents were sampled.

Because determining an exact current reading delay may be difficultand/or resource prohibitive, and/or because the current reading delaymay be fairly accurately estimated, the block 506 may merely estimatethis delay. Compared with the other delays, this delay may be rathersmall. Estimating of this delay may, for example, depend on the samplingclock cycle of the current signal. For example, a current reading couldbe instant, or could be delayed by a sampling cycle, and this readingmay depend on the sampling clock. An average of this delay may be, forexample, one half of a sampling cycle.

At block 508, a power switches deadtime delay may be measured. Thecontrol system may experience delays associated with power switchingdeadtime. When pulse width modulation generation module reaches acompare value, insulated-gate bipolar transistor (IGBT) switches may notbe able to turn on or off immediately due to the deadtime protection.Neglecting the deadtime effect, a pulse width modulation zero counterinstant would exactly correspond to the averaging instant of the actualcurrent ripple waveform of the motor 117. However, the deadtime effectmay not be negligible. Accordingly, the averaging instant of actualcurrent ripple may have a time delay from a PWM zero counter instant,such as around half of the deadtime duration, which may requireadjusting the averaging current sensing instant.

The deadtime may be set, for example by hardware or software, such asthe IGBT controller, to a very precise delay. The deadtime delay may bemeasured, or may simply be identified from the setting hardware and/orsoftware. For example, the deadtime delay average may be half of thedeadtime set by the hardware and/or software.

While blocks 502, 504, 506, and 508 are shown in FIG. 5 as beingperformed in that order, in other methods, any of these blocks may beperformed in any order.

At block 510, a total delay may be calculated and/or generated. Thetotal delay may be calculated, for example, by adding together themeasured delays from blocks 502, 504, and 508 with the estimated delayof block 506. This may be done, for example, by a processor such as dataprocessor 264, by either the primary processing module 114 or thesecondary processing module 116, or any other internal or externalprocessor or modules. Other methods of obtaining the total delay may bepossible.

At block 512, a current sensing instant may be adjusted to account forthe calculated total delay. For example, a current sensing instant maybe set to occur at an instant which may occur a time length after thestart of a PWM cycle for the generating signal to the motor 117, wherethe time length may equal the total delay. In this way, the currentsensing instant may be set to appropriately correct for and/or accountfor each delay that the control system may face.

At block 514, the current sensing instant may then be used, as in block414 of FIG. 4, to properly measure subsequent current sensing instantsfrom current signals generated by the motor 117.

Because it may be difficult, cost prohibitive, and/or resource intensiveto perfectly set the current sensing instant, some deviation from theideal and/or best current sensing instant may be allowable. For example,a delay or advancement on the order of 1 micro-second may be acceptable.Other values and/or delays may be acceptable. Additionally, it may behelpful to put a proper offset to current transducer readings prior tocalibrating for the current sensing instant, which may remove any offseterror in the current sensing.

Once the current sensing instant is tuned for a specific inverterdesign, it may not change much with respect to hardware componentparameter drifting. Additionally, even where non-synchronization ofcurrent sensing and position sensing exists, such as where a generatedtorque deviates from a desired value due to an incorrect dq-axis used ina current regulation controller 111, this may not directly affectcurrent regulation magnitudes, so long as the current sensing instant isproperly tuned. Accordingly, in some systems, the current sensinginstant may be tuned once, with the tuning being carried out prior tofull blown operation of the control system.

In addition to determining a proper current sensing instant, the properfunctioning of a control system in FIG. 1 may also require propercalibration of current transducers (CTs) used in measuring the currentof a motor 117. In particular, it may be beneficial to calibrate one ormore CT scaling ratios, which may also be referred to as CT scalingratios.

The CT scaling coefficients may, for example, be stored in a look uptable, which may be used to apply the coefficients to a signal from acurrent transducer. Such coefficients may be used, for example, toaccount for various effects of the system, such as a temperature andcurrent magnitude, which may otherwise cause inaccurate current signalsand/or readings.

A CT scaling coefficient may not be constant, but may rather vary with,for example, a current magnitude. Accordingly, one may calibrate a CTusing CT scaling coefficients for various current magnitudes, which maybe referred to when an actual current magnitude is measured by thecurrent transducer.

There may be one or more ways to calibrate a current transducer. Forexample, one may calibrate a current transducer using a direct current(DC) current calibration, and/or may calibrate a current transducerusing an alternating current (AC) current calibration. In otherexamples, one may calibrate a current transducer using a DC currentcalibration, and then may verify the calibration using an AC currentcalibration.

For example, FIG. 6 shows one method of calculating scaling coefficients(or scaling ratios) useful for calibrating current transducers and/oradjusting measured current signals and/or current commands for properoperation and/or control of a motor 117.

The method of FIG. 6 begins at block 602, where a known DC currentmagnitude may be identified. For the DC current calibration, a directcurrent (dc) power supply may be attached, connected, coupled, and/or incommunication with the motor 117 and/or the control system. In somesystems, the dc power supply may have a high current limitingcapability, such as up to or exceeding 500 amps (A). Other powersupplies may be used.

In block 604, the DC current from the dc power supply may be commandedthrough the motor 117 and/or machine windings.

At block 606, an actual (feedback) current may be measured from themotor 117, such as using a high performance Danfysic current transducermeasurement or using a shunt resistor to measure the actual dc current.

At block 608, the inverter or controller feedback current may becompared to the actual DC current that was supplied from the dc powersupply.

As a result of the comparison in block 608, at block 610, a scalingcoefficient or scaling ratio may be derived and/or calculated. Thescaling coefficient may correspond to the magnitude of the actualmeasured DC current supplied from the dc power supply and run throughthe motor 117. For example, a scaling coefficient may be the magnitudeof the known DC current over the actual feedback current received, ormay be the inverse of this.

In some methods, the known DC current may also be run through themachine and/or motor 117 in an opposite direction. In some systems,another scaling ratio may be calculated in the opposite direction aswell. The scaling ratio for the given DC current and/or measured currentmay then be calculated by taking the average of the scaling ratios. Insome of these systems and methods, some or all of the blocks of themethod in FIG. 6 may be repeated separately, after the method iscompleted for all currents in a first direction, or may be completed foreach DC current immediately after the scaling coefficient is determinedfor the specified DC current.

In block 611, the scaling coefficient generated in block 610 may beverified using an alternating current calibration. For example, aspecific current magnitude at a Gamma angle, such as a moderate Gammaangle of 45 degrees, may be commanded through the motor 117, an actualaverage three phase current from the motor 117 may be received, and theactual average three phase current may be compared to the commandedspecific current. Block 611 may also or alternatively be conducted in amanner consistent with the AC current calibration procedure identifiedbelow.

Block 611 may be repeated at a plurality of shaft speeds and/or withdifferent electrical frequencies. Block 611 may be optional.Alternatively, the verifying block 611 may take place after block 614 ofthis method, as described below.

In block 612, the scaling coefficient may be stored in a look up table.The lookup table may be a part of, in communication with, connected to,attached to, and/or otherwise linked with the electronic data processingsystem 120, a data processor such as data processor 264, and/or variouscomponents of the control system, such as the primary processing module114, the secondary processing module 116, or other components. Thestored scaling coefficient may also be associated with and/or affiliatedwith the DC current magnitude of the current commanded through the motor117 or machine winding.

In block 614, the method may look to see where the lookup table has asufficient number of scaling coefficient entries. For example, thelookup table may require a certain number of entries, or may require anentry for every interval of current, such as for every additional amp ofDC current. In other methods, this block may be manually performed,and/or may be eliminated. In some of these methods, block 602 may ratherinclude a full list of known DC current magnitudes which may require ascaling ratio calculation, and block 612 may instead simply check thelist to see if all of the scaling ratios have been calculated.

If more calculations are necessary, the method may move to block 618where another known DC current magnitude may be used to calculate thescaling coefficient for, by moving to block 604 of the method.

The above-described DC current scaling process may be repeated one ormore times, using one or more different known DC currents. Scalingcoefficients may be collected for each of the different known DCcurrents and/or measured currents from the motor 117.

The scaling coefficients may be saved and/or input into a table, such asa lookup table. The lookup table may be stored in and/or accessed by theelectronic data processing system 120 of FIGS. 1 and 2, the data storagedevice 260, the data processor 264, and/or other components of thecontrol system.

The method of FIG. 6 may be conducted prior to operation of the motor117 in any commercial and/or designated tasks. If the lookup table iscomplete, the method may move to block 616, where the lookup table maybe used. The lookup table may be used, for example, by receiving anactual measured current from the motor 117 or checking the currentcommand applied to the motor 117, and applying the scaling ratio and/orscaling coefficient from the lookup table to the actual measuredcurrent, obtaining an adjusted current. Other uses are possible.

The tables, data, and/or lookup tables may subsequently be accessed atany time the motor 117 is in operation. The data in the lookup tablesmay be used to scale a reading from the designated CT, and/or may beused to alter an input into the motor 117 based on the data in thelookup tables.

These processes may be carried out for each of the current transducersused with the control system and/or motor 117. For example, where themotor 117 is a three phase motor, three current transducers may beincluded with the motor 117. Each of the current transducers may includea table and/or scaling data and ratios, which may subsequently be reliedupon to properly scale data to or from the current transducer. Thecalculated scaling ratios may be calibrated separately and stored foreach phase of the three phase motor. This DC current calibrationprocedure may be sufficient to properly determine and supply scalingdata for a current transducer.

As mentioned, verifying the scaling ratios in the lookup table using anAC current calibration, shown in block 611, may also be done after block614.

An AC current calibration may utilize and/or require a prime mover. Theprime mover may maintain a constant shaft speed, such as a machine basespeed. A known current command, which may have a current magnitude at aGamma angle, may then be supplied to the motor 117. The Gamma angle may,for example, be 45 degrees.

The actual averaged three phase currents of the motor 117 may bemonitored, sensed, and/or otherwise observed. The observed current maybe compared with the commanded value. A scaling coefficient or scalingratio may be obtained, identified, calculated, and/or determined fromthe comparison. The scaling coefficient may be compared to the DCcurrent calibration scaling ratio where the AC current calibration isused as a verification process. The AC current calibration maysimultaneously adjust a CT scaling coefficient for all three currenttransducers simultaneously, rather than any one particular CT scalingcoefficient for one of the current transducers. Additionally, in somesystems, it may be useful to ensure that a proper pulse width modulationswitching frequency and/or PI gain is carefully tuned to achieve asufficiently small unbalance percentage prior to performing the ACcurrent calibration.

As mentioned, the CT scaling coefficients may be stored in a table, suchas a lookup table. Upon subsequent three phase current feedbackreadings, such as those current feedback signals sent from theanalog-to-digital converter 122 to the secondary processing module 116,the current feedback readings may be adjusted by and/or multiplied bythe CT scaling coefficient. This may be best where the three phasecurrent transducers have close scaling coefficients versus magnitudes.

An example of the use of the CT lookup table is shown in the circuitdrawing in FIG. 7. In FIG. 7, a d-axis current command and a q-axiscurrent command may be combined at block 710, using the equation inblock 715 to achieve a total current command input 718 to a CT scalinglookup table 720. The equation in block 715 may be:i*=square root((i _(d)*)²+(i _(q)*)²)

In addition, the CT scaling lookup table 720 may also receive as inputsa current command vector 722 and a CT scaling vector 724. These vectors722 and 724 which may include the information regarding the CT scalingcoefficient as they relate to various known DC current magnitudes. Forexample, vector 722 may store known DC current magnitudes during a dccurrent calibration procedure, and/or vector 734 may store correspondingcalculated scaling ratios at each dc current magnitude. Otherconfigurations are possible.

A current transducer scaling coefficient 730 may be output from the CTscaling lookup table 720 based on the input current command 718. Forexample, the current input into the CT scaling lookup table 720 may becompared with information in the lookup table, and an appropriate CTscaling coefficient may be selected based on the current commandmagnitude.

A phase current calculation block 725 may be used to calculate the threephases current from the motor 117 after proper filtering, processingetc. For example, the phase calculation block 725 may be implemented inand/or comprise the secondary processing module 116 in FIG. 1.

Each of the three phases of current, identified as phase A current 727,phase B current 728, and phase C current 729 may then be multiplied bythe CT scaling coefficient 730. For example, the phase A current 727 maybe multiplied by the CT scaling coefficient 730 at multiplication block740; phase B current 728 may be multiplied by the CT scaling coefficient730 at multiplication block 741; and phase C current 729 may bemultiplied by the CT scaling coefficient 730 at multiplication block742. The results may be output individually and/or combined at block 750to obtain an output 760.

While FIG. 7 shows one lookup table for all three phases of a threephase current, in some other systems each of the phases and/or currenttransducers may have different lookup tables. For example, the CT lookuptable 720 may only be used to multiply and/or adjust the current for aphase A current 727 at multiplication block 740, while a second CTlookup table (not shown) may be used to multiply and/or adjust thecurrent for the phase B current, etc. If the CT scaling lookup tablesare stored in boot book or EEPROM, they may be loaded into a controllerfor easy comparison.

Where a current sensing instant has been properly tuned, the abovedescribed DC/AC current calibration procedure may achieve very accuratecurrent regulation magnitudes, such as within 1% error. This may bepossible through a whole speed range and at various current or torquelevels.

FIG. 8 illustrates an example of the operation of some current sensingcomponents in the control system, after the current sensing instantand/or CT scaling ratios have been calibrated.

A field programmable gate array 870 may be attached, connected, coupled,and/or in communication with an external analog-to-digital converter 880used for sensing a current from the motor 117. The externalanalog-to-digital converter 880 may be the analog-to-digital converter122 or another analog-to-digital converter. The externalanalog-to-digital converter 880 may continuously sense a current signaland may produce a continuous stream or set of digital samples and/orsignals from the sensed current signal, which may be sent to the fieldprogrammable gate array 870. For example, a sampling speed for theexternal analog-to-digital converter may produce a new sample every 1-2microseconds. While the analog-to-digital converter 880 is shown in FIG.8 as being external, the field programmable gate array 870 may have aninternal analog-to-digital converter instead.

It should be appreciated that while reference is made herein to a fieldprogrammable gate array 870, this component may, in some systems, beanother type of digital storage and/or computing device, such as acomplex programmable logic device (CPLD).

The field programmable gate array 870 may continuously receive digitalcurrent samples from the external analog-to-digital converter 880. Thefield programmable gate array 870 may, for example, include a buffer 890which may be used to store the digital current samples received from theanalog-to-digital converter 880.

In addition or alternatively, the field programmable gate array 870 mayinclude one or more filters. For example, the field programmable gatearray 870 may have an FIR filter which may be used to filter out noisefrom the received current signal.

A digital signal processor 850 may be attached, connected, coupled,and/or in communication with the field programmable gate array 870. Thedigital signal processor 850 may, for example, access and/or store datarelated to the calibrated current sensing instant. For example, thedigital signal processor 850 may have data related to delays and/orcurrent signals, and/or may monitor a PWM carrier signal generated by ageneration module 112, such as signal 810.

In accordance with the received PWM carrier signal from the generationmodule 112, as well as the data about the current sensing instant, thedigital signal processor 850 may calculate, estimate, identify, and/orotherwise determine the proper instant at which the received currentsignal should be sampled. The proper instant may be shown as dotted line806, and dotted line 808 in the digital signal processor 850. Inaccordance with this determination, the digital signal processor maygenerate and/or transmit a digital pulse 830 to the field programmablegate array 870. The digital pulse 830 may indicate a current sensinginstant at which to latch a current value from a sensed current signal.The digital pulse 830 may be a rising edge triggered digital pulse,and/or may represent the best and/or calibrated current sensing instant.A rising or falling edge of the digital pulse 830 may be configured tocorrespond to an averaging point of the sensed current signal. Thedigital pulse 830 may be configured to provide a cue or to latch acurrent value from the set of current signals such that it correspondsto an averaging point of a rising or falling current slope.

The digital signal processor 850 may generate the digital pulse 830 in anumber of ways. For example, the digital signal processor 850 mayinclude and/or use as many as six PWM modules or generators. In somedigital signal processors 850, three of these PWM generators may be usedto generate a voltage signal or pulse to be sent to the motor 117, suchas a phase A, phase B, and phase C voltage signals. The signal 810 may,for example, represent the combination of the three PWM carrier signalsgenerated by these three PWM generators.

In addition or alternatively, a spare PWM generation module to generatean up-count carrier signal, such as pulse 820. In some systems, it isalso possible to use other spare DSP components, such as an enhancedcapture (eCap) module, to generate the digital pulse 820. The up-countcarrier signal may have a cycle which may start, for example, at azero-point, low point, or period point corresponding to the three-phasegeneration signal 810, as indicated by the dotted lines 802 and 804 inFIG. 8. The spare PWM module carrier signal 820 may be synchronized withthe three other PWM modules generating carrier signals 810 for phases A,B, and C. The current sensing instant may be calculated and/or stored inthe digital signal processor 850 in a number of ways. For example, thedigital signal processor 850 may be configured so that a digital pulse830 may be generated a designated count, or time, after the start of theup-count pulse 820. The time may be represented, for example, by thedelay 809. By adjusting the delay 809 between the start of the up-countcarrier signal 820 and the current sensing instant, the digital signalprocessor may be easily calibrated to properly generate the digitalpulse 830 corresponding to the best current sensing instant.

Upon receiving the transmitted digital pulse 830 from the digital signalprocessor 850, the field programmable gate array 870 may latch,catalogue, document, and/or otherwise identify the three phase currentsent from the external analog-to-digital converter at that instant. Inparticular, the field programmable gate array 870 may be configured tolatch a set of three phase current values from the continuously sensedand filtered current signal at the current sensing instant indicated bythe rising or falling edge of the digital pulse. The latched three phasecurrent value set may, for example, be the most recent set of phasecurrent values in the buffer of the field programmable gate array 870 atthe instant the digital pulse 830 is received.

This latched three phase current signal 895 may then be sent,transmitted, fed, and/or otherwise sent to the digital signal processor850. The digital signal processor 850 may process the received threephase current signal 895. For example, the digital signal processor 850may perform a Park transformation or other phase transformation on thereceived three phase signal, and may generate a d-axis current signaland a q-axis current signal as a result. After performing thetransformation, the digital signal processor 850 may send, feed,transmit, and/or otherwise output the resulting two-phase currentsignal, such as to the current regulation controller 111.

Alternatively, the transformation of the signal may be performed inand/or by the field programmable gate array 870.

While FIG. 8 shows one external analog-to-digital converter 880, moremay be present. For example, the control system may use three externalanalog-to-digital converters, with each one being directed to one of thephases of the three phase current. In systems like this, the fieldprogrammable gate array 870 may latch one phase of the three phasesensed currents from the stored digital current samples received fromeach of the external analog-to-digital converters. Other configurationsare possible.

In some systems, one or both of the field programmable gate array 870and the digital signal processor 850 may be components of the secondaryprocessing module 116. In other systems, one or both of the fieldprogrammable gate array 870 and the digital signal processor 850 may becomponents of the electronic data processing system 120. In othersystems, other configurations may be possible.

Having described the preferred embodiment, it will become apparent thatvarious modifications can be made without departing from the scope ofthe invention as defined in the accompanying claims.

We claim:
 1. A method of calibrating a current sensing instant to latcha current value from a set of current signals comprising: providing acurrent command including a magnitude at a Gamma angle to control amotor when the motor is operating in a motoring mode at a shaft speed;providing a matching current command including a same magnitude at asame Gamma angle to control the motor when the motor is operating in abraking mode at a same shaft speed; monitoring, when the motor iscontrolled by the current command and operating in the motoring mode, afirst actual averaging rms current magnitude of three phase currents ofthe motor; monitoring, when the motor is controlled by the matchingcurrent command and operating in the braking mode, a second actualaveraging rms current magnitude of the three phase currents of themotor; adjusting a current sensing instant until an observed firstactual averaging rms current magnitude in the motoring mode equals anobserved second actual averaging rms current magnitude in the brakingmode.
 2. The method of claim 1, wherein an actual averaging rms currentmagnitude of three phase currents of the motor is continuously sensed.3. The method of claim 2, wherein the current sensing instant isadjusted for each pulse width modulation cycle.
 4. The method of claim1, wherein the motoring mode represents a mode of operation where themotor is receiving power from a power source, and the braking moderepresents a mode of operation where the motor is supplying power to thepower source.
 5. The method of claim 1, wherein the current sensinginstant is configured to latch a current value from the set of currentsignals such that it corresponds to an averaging point of a rising orfalling current slope.
 6. A system for processing a sensed currentsignal from a motor, the system comprising: a digital signal processor;a field programmable gate array in communication with the digital signalprocessor; the digital signal processor being configured to generate adigital pulse indicating a current sensing instant at which to latch acurrent value from a sensed current signal from a motor, a rising orfalling edge of the digital pulse being configured to correspond to anaveraging point of the sensed current signal; the field programmablegate array being configured to receive a continuously sensed three phasecurrent signal from a motor and the digital pulse from the digitalsignal processor, the field programmable gate array configured to latcha set of three phase current values from the continuously sensed currentsignal at the current sensing instant indicated by the rising or fallingedge of the digital pulse, and transmit the latched three phase currentvalues to the digital signal processor.
 7. The system of claim 6,wherein the digital signal processor is configured to perform a Parktransformation on the received latched three phase current value togenerate a d-axis current signal and a q-axis current signal.
 8. Thesystem of claim 7, further comprising a current regulation controllerconfigured to receive the d-axis current signal and the q-axis currentsignal from the digital signal processor.
 9. The system of claim 6,wherein the digital signal processor comprises a pulse width modulationgenerator dedicated to generating the digital pulse.
 10. The system ofclaim 6, wherein the field programmable gate array receives thecontinuously sensed three phase current signal from either an externalanalog-to-digital converter and sensing circuit, or from an internalanalog-to-digital converter and sensing circuit.
 11. The system of claim6, wherein the field programmable gate array includes a filter whichfilters the continuously sensed three phase current signal.
 12. A methodof calibrating inverter current transducers for a machine controller,the method comprising: commanding a known DC current through a machinewinding; receiving a feedback current from the machine controller;comparing the feedback current to the known DC current; calculating ascaling ratio based on the comparison; repeating the steps ofcommanding, receiving, comparing, and calculating a plurality of times,each time using a different known DC current magnitude; generating alookup table comprising the calculated scaling ratios for the known DCcurrent magnitudes; wherein the known DC current is commanded throughthe machine winding in a first direction; commanding the known DCcurrent through the machine winding in a second direction opposite thefirst direction; receiving a second feedback current from the machinecontroller; comparing the second feedback current to the known DCcurrent; and calculating a second scaling ratio based on the comparison.13. The method of claim 12, wherein the calculated scaling ratios arecalibrated separately and stored for each phase of the three-phasemotor.
 14. The method of claim 12, wherein the steps of commanding,receiving, comparing, calculating, repeating, and generating arepreformed prior to a designated operation of the machine, and whereinduring the designated operation of the machine, a measured currentmagnitude of the machine is adjusted by a corresponding scaling ratiostored in the lookup table.
 15. A method of calibrating inverter currenttransducers for a machine controller, the method comprising: commandinga known DC current through a machine winding; receiving a feedbackcurrent from the machine controller; comparing the feedback current tothe known DC current; calculating a scaling ratio based on thecomparison; repeating the steps of commanding, receiving, comparing, andcalculating a plurality of times, each time using a different known DCcurrent magnitude; generating a lookup table comprising the calculatedscaling ratios for the known DC current magnitudes; verifying thescaling ratio using AC current; and wherein verifying the scaling ratiocomprises commanding a specific current magnitude at a moderate Gammaangle through machine, receiving an actual average three phase currentfrom the machine, and comparing the actual average three phase currentto the commanded specific current magnitude.
 16. The method of claim 15,further comprising repeating the step of verifying at a plurality ofshaft speeds with different electrical frequencies.
 17. A methodperformed by a processor of calculating a time delay associated withreceiving and processing a current signal, the method comprising:measuring a hardware circuit phase delay by the processor; measuring acurrent samples processing or filtering delay by the processor;estimating a current reading delay by the processor; measuring a powerswitches deadtime delay by the processor; and adjusting by the processora current sensing instant used to latch a current value from acontinuously sensed current signal buffer, the adjustment based on atotal delay from the measured hardware phase delay, the measured currentsamples processing delay, the estimated current reading delay, and themeasured power switches deadtime delay.
 18. The method of claim 17,wherein the current reading delay includes delays from reading currentsamples from an analog-to-digital converter to a field programmable gatearray, and delays from transmitting latched current values from a fieldprogrammable gate array to a digital signal processor through a parallelbus.
 19. The method of claim 18, wherein the current reading delay isestimated based on a sampling clock cycle of the current signal.
 20. Themethod of claim 17, wherein the hardware delay results from at least oneof a current transducer coupled to a motor, a low-pass anti-aliasingfilter, an operational amplifier for analog signal offset and scalingadjustment, or an analog-to-digital converter delay.
 21. The method ofclaim 20, wherein the hardware delay is determined by comparing a firstsignal directly outputted by a motor to a second signal outputted by themotor and received immediately prior to being transmitted to a fieldprogrammable gate array.
 22. The method of claim 17, wherein the currentsamples processing delay includes a phase delay from digital filteringof a series of sampled current signals.
 23. The method of claim 17,wherein the power switches deadtime delay is measured based on adeadtime of a power switch.